package com.jp.knowledge.logic;

import android.os.Handler;
import android.os.Message;

/**
 * Created by jiayen on 17/4/6.
 *
 * 计算   倒计时  帮助类
 */

public class CountLogic {
        private  int  organzation_time =60;//计时一分钟 针对认领组织

    private CountTime countTime;
    public  CountLogic(CountTime countTime){
        this.countTime=countTime;
    }
    private Handler handler  = new Handler(){
        @Override
        public void handleMessage(Message msg) {

        }
    };

    /**
     * 开始计时
     */
    public void startTime(){
        handler.postDelayed(new Runnable() {
            @Override
            public void run() {
                handler.sendEmptyMessage(0);
            }
        },1000);
    }

    public interface     CountTime{
        void countTime(int nextTime);
    }

}
